<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>嵌套的for循环</title>
	<script type="text/javascript">
		for(var i = 0; i < 5; i++){
			/*正三角
			for(var j = 0; j < i+1; j++){
				document.write("* ");
			}*/
			
			for(var j=0;j<5-i;j++){
				document.write("* ");

			}
				document.write("<br />");
		}
	</script>
</head>
<body>
</body>
</html>